package com.rongshu.view.userInfo.activity;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.rongshu.R;
import com.rongshu.utils.Constant;
import com.rongshu.view.base.BaseActivity;
import com.rongshu.view.home.widget.SelectableTextView;

import butterknife.BindView;
import butterknife.OnClick;

public class SystemMessageDetailsActivity extends BaseActivity {
    @BindView(R.id.head_middle)
    TextView head_middle;
    @BindView(R.id.txt_massage_content)
    SelectableTextView txt_massage_content;

    //intent
    private Intent intent = null;

    @Override
    protected int initLayout() {
        return R.layout.activity_system_message_details_view;
    }

    @Override
    protected void initView() {
        intent = getIntent();
        if (intent != null) {
            int type = intent.getIntExtra(Constant.INTENT_TYPE, 0);
            switch (type) {
                case Constant.MESSAGE_CONTRIBUTE_FAILD:
                    head_middle.setText("退稿信");
                    break;
                default:
                    head_middle.setText("系统消息");
                    break;
            }
            String content = intent.getStringExtra(Constant.INTENT_MESSAGE);
            txt_massage_content.setText(content);
        }
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void updateViews(boolean isRefresh) {

    }

    @OnClick({R.id.head_left})
    public void onClick(View view) {
        if (view.getId() == R.id.head_left) {
            finish();
        }
    }
}
